<template>
  <Form class="base-form" :label-width="100">
    <FormItem label="宽度(24的倍数)" v-if="activeCom">
      <InputNumber
        :value="activeCom.location.w"
        :min="1"
        :max="24"
        placeholder="请输入宽度(24的倍数)"
        @on-change="v=>{changeValue(v,'w')}"
      />
    </FormItem>
  </Form>
</template>

<script>
import { mapState } from 'vuex';
export default {
  computed: {
    ...mapState({
      activeCom: state => state.mark.activeCom
    })
  },
  props: ['value'],
  data () {
    return {};
  },
  methods: {
    changeValue (v, name) {
      this.activeCom.location[name] = v;
      this.$emit('updateValue', this.activeCom)
    }
  }
};
</script>
